package com.vmark.ffmpeglib

import java.nio.ByteBuffer

/**
 * @author 战神族灬小火
 * @date 2025/1/10
 * @description
 */
class Ffmpeg {
     init {
         System.loadLibrary("ffmpeg_v4_native-lib")  // 确保本地库的名称正确
     }

    companion object {
        private const val TAG = "===Ffmpeg==="
        private val instant by lazy { Ffmpeg() }
        fun getInstance(): Ffmpeg {
            return instant
        }
    }

    // 定义 JNI 方法
    external fun ffmpeg_exec(command:String):Int

    external fun getTemperatureFromFrame(x:Int,y:Int):Float

    external fun usbCamera(devicePath:String)

    external fun initUpStreamer()
    external fun cleanupStreamer()

    external  fun pushStream()
    external  fun pushStreamData(data:ByteBuffer)
}